<div class="friends view">
<h2><?php  __('Friend');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $friend['Friend']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Friend Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $friend['Friend']['friend_id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $friend['Friend']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $friend['Friend']['created']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Friend', true), array('action' => 'edit', $friend['Friend']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Friend', true), array('action' => 'delete', $friend['Friend']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $friend['Friend']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Friends', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Friend', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Users');?></h3>
	<?php if (!empty($friend['User'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Password'); ?></th>
		<th><?php __('Status'); ?></th>
		<th><?php __('Group'); ?></th>
		<th><?php __('First Name'); ?></th>
		<th><?php __('Last Name'); ?></th>
		<th><?php __('Address1'); ?></th>
		<th><?php __('Address2'); ?></th>
		<th><?php __('Address3'); ?></th>
		<th><?php __('Address4'); ?></th>
		<th><?php __('Address5'); ?></th>
		<th><?php __('Phone1'); ?></th>
		<th><?php __('Phone2'); ?></th>
		<th><?php __('Phone3'); ?></th>
		<th><?php __('Phone4'); ?></th>
		<th><?php __('Registration Date'); ?></th>
		<th><?php __('Note'); ?></th>
		<th><?php __('Company'); ?></th>
		<th><?php __('Bank Account'); ?></th>
		<th><?php __('Delivery As Billing'); ?></th>
		<th><?php __('Delivery First Name'); ?></th>
		<th><?php __('Delivery Address1'); ?></th>
		<th><?php __('Delivery Address2'); ?></th>
		<th><?php __('Delivery Address3'); ?></th>
		<th><?php __('Delivery Address4'); ?></th>
		<th><?php __('Delivery Address5'); ?></th>
		<th><?php __('Old Email'); ?></th>
		<th><?php __('Prepayment'); ?></th>
		<th><?php __('Commission'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($friend['User'] as $user):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $user['id'];?></td>
			<td><?php echo $user['email'];?></td>
			<td><?php echo $user['password'];?></td>
			<td><?php echo $user['status'];?></td>
			<td><?php echo $user['group'];?></td>
			<td><?php echo $user['first_name'];?></td>
			<td><?php echo $user['last_name'];?></td>
			<td><?php echo $user['address1'];?></td>
			<td><?php echo $user['address2'];?></td>
			<td><?php echo $user['address3'];?></td>
			<td><?php echo $user['address4'];?></td>
			<td><?php echo $user['address5'];?></td>
			<td><?php echo $user['phone1'];?></td>
			<td><?php echo $user['phone2'];?></td>
			<td><?php echo $user['phone3'];?></td>
			<td><?php echo $user['phone4'];?></td>
			<td><?php echo $user['registration_date'];?></td>
			<td><?php echo $user['note'];?></td>
			<td><?php echo $user['company'];?></td>
			<td><?php echo $user['bank_account'];?></td>
			<td><?php echo $user['delivery_as_billing'];?></td>
			<td><?php echo $user['delivery_first_name'];?></td>
			<td><?php echo $user['delivery_address1'];?></td>
			<td><?php echo $user['delivery_address2'];?></td>
			<td><?php echo $user['delivery_address3'];?></td>
			<td><?php echo $user['delivery_address4'];?></td>
			<td><?php echo $user['delivery_address5'];?></td>
			<td><?php echo $user['old_email'];?></td>
			<td><?php echo $user['prepayment'];?></td>
			<td><?php echo $user['commission'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'users', 'action' => 'view', $user['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'users', 'action' => 'edit', $user['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'users', 'action' => 'delete', $user['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User', true), array('controller' => 'users', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
